from autotest.framework.base_page import BasePage
from selenium.webdriver.common.by import By
from autotest.logs.logger import Logger

logger = Logger(logger="cloud_page").getlog()

class Cloud(BasePage):
    #定位器页面要用的元素统一获取
    input_box=(By.ID,'chat-textarea')
    search_submit=(By.XPATH,'//*[@id="chat-submit-button"]')

    def value_input(self,text):
        self.wait(self.input_box,5)
        self.send_keys(self.input_box,text)

    def submit_btn(self):
        self.click(self.search_submit)
        logger.info("提交成功，查看结果")
        self.sleep(2)